<?php require ('./order.php'); ?>
<?php
session_start();
 if (isset($_SESSION['time']))//判断缓存时间
    {
        session_id();
        $_SESSION['time'];
    }
    else
    {
        $_SESSION['time'] = date("Y-m-d H:i:s");
    }
    $_SESSION['mcode']=$_GET['mcode'];

if((strtotime($_SESSION['time'])+10)<time()) {//验证码60秒失效
        session_destroy();
        unset($_SESSION);
        header('content-type:text/html; charset=utf-8;');
        echo '<script>alert("验证码已过期, 请重新获取！");</script>';
}
?>